import type { RouteRecordRaw } from 'vue-router'
import Dashboard from '@/views/dashboard/index.vue'
import NotFound from '@/views/fallback/not-found.vue'

/** 全局404页面 */
export const fallbackNotFoundRoute: RouteRecordRaw = {
  component: NotFound,
  meta: {
    title: '404'
  },
  name: 'FallbackNotFound',
  path: '/:path(.*)*'
}

/** 基本路由，这些路由是必须存在的 */
export const basicRoutes: RouteRecordRaw[] = [
  {
    name: 'Dashboard',
    path: '/',
    meta: {
      title: '仪表盘'
    },
    component: Dashboard
  },
  {
    name: 'DataShareService',
    path: '/data-share-service',
    meta: {
      title: '数据共享服务'
    },
    component: () => import('@/views/data-share-service/index.vue')
  },
  {
    name: 'OfflineUploadService',
    path: '/offline-upload-service',
    meta: {
      title: '离线上传服务'
    },
    component: () => import('@/views/offline-upload-service/index.vue')
  },
  {
    name: 'OfflineDownloadService',
    path: '/offline-download-service',
    meta: {
      title: '离线下载服务'
    },
    component: () => import('@/views/offline-download-service/index.vue')
  },
  {
    name: 'ToolboxWatermark',
    path: '/toolbox-watermark',
    meta: {
      title: '工具箱数据水印'
    },
    component: () => import('@/views/toolbox-watermark/index.vue')
  },
  {
    name: 'ToolboxDesensitization',
    path: '/toolbox-desensitization',
    meta: {
      title: '工具箱数据脱敏'
    },
    component: () => import('@/views/toolbox-desensitization/index.vue')
  },
  {
    name: 'ToolboxTracing',
    path: '/toolbox-traceability',
    meta: {
      title: '工具箱水印溯源'
    },
    component: () => import('@/views/toolbox-traceability/index.vue')
  },
  {
    name: 'ToolboxSensitive',
    path: '/toolbox-sensitive',
    meta: {
      title: '工具箱敏感数据发现'
    },
    component: () => import('@/views/toolbox-sensitive/index.vue')
  },
  {
    name: 'index',
    path: '/index',
    meta: {
      title: 'cs'
    },
    component: () => import('@/views/index/index.vue')
  },
  /** 接口列表 20250905新增 */
  {
    name: 'InterfaceList',
    path: '/interface-list',
    meta: {
      title: '接口列表'
    },
    component: () => import('@/views/interface-list/index.vue')
  },
  /** 数据流程测绘 20250907新增 */
  {
    name: 'DataFlowChartering',
    path: '/data-flow-chartering',
    meta: {
      title: '数据流程测绘'
    },
    component: () => import('@/views/data-flow-chartering/index.vue')
  },
  /** 资产交互记录 20250910新增 */
  {
    name: 'AssetInteractionRecords',
    path: '/asset-interaction-records',
    meta: {
      title: '资产交互记录'
    },
    component: () => import('@/views/asset-interaction-records/index.vue')
  },
  /** 数据安全供给 20250912新增 */
  {
    name: 'DataSecuritySupply',
    path: '/data-security-supply',
    meta: {
      title: '数据安全供给'
    },
    component: () => import('@/views/data-security-supply/index.vue')
  },
  /**日志审计 */
  {
    name: 'LogAudit',
    path: '/log-audit',
    meta: {
      title: '日志审计'
    },
    component: () => import('@/views/log-audit/index.vue')
  }
]
